package com.gf.gf_data.sys;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 服务启动时执行（如加载数据到redis缓存...）
 *
 * Created in 12:08 2017/12/15 by yxl
 */
@Component
@Order(value = 1) // 优先级是按value值从小到大顺序
public class CustomStartupRunner implements CommandLineRunner {

    @Override
    public void run(String... strings) throws Exception {
        System.out.println(">>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作(Order : 1)<<<<<<<<<<<<<");
    }
}
